﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Configuration;
using System.Configuration.Provider;

namespace HomeDmsPageStorageProviders
{
    public class PageStorageProvidersSection : ConfigurationSection
    {
        public const string ProvidersName = "providers";
        public const string MainProviderName = "mainProvider";

        [ConfigurationProperty(ProvidersName)]
        public ProviderSettingsCollection Providers
        {
            get
            {
                return (ProviderSettingsCollection)base[ProvidersName];
            }
        }

        //[StringValidator(MinLength=1)]
        [ConfigurationProperty(MainProviderName)]
        public string MainProvider
        {
            get
            {
                return (string)base[MainProviderName];
            }
            set
            {
                base[MainProviderName] = value;
            }
        }
    }
}
